//
//  mycell.m
//  testjson
//
//  Created by fcbayern on 2020/12/1.
//  Copyright © 2020 fcbayern. All rights reserved.
//

#import "mycell.h"

@implementation mycell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        //创建子视图
       [self createSubViews];
    }
    return self;
}
- (void) createSubViews {
    _title = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 150, 50)];
    _Delete = [[UIButton alloc]initWithFrame:CGRectMake(126, 100, 50, 50)];
    _edit = [[UIButton alloc]initWithFrame:CGRectMake(90, 100, 50, 50)];
    _synopsis = [[UILabel alloc]initWithFrame:CGRectMake(0, 30, 150, 100)];
    _synopsis.numberOfLines = 0;
    [self addSubview:_title];
    [self addSubview:_Delete];
    [self addSubview:_synopsis];
    [self addSubview:_edit];
}

//每一组的偏移量
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section{

    return UIEdgeInsetsMake(0, 50, 0, 0);
}
@end
